define(["cmn","jquery","lib/render"],function(cmn,$,a){
	var FN_MAP={},ejs=cmn.ejs("wjdc/wjdchome");
	ejs.set("main","main");
	ejs.set("question","question");
	cmn.post({action:"functionMap"}).then(function(data){
		FN_MAP=data;
	})
	return {
		init:function(){
			this.code="000";
			this.renderQuestion();
		},
		renderQuestion:function(){
			var _=this,div=_.el.find("#container");
			function f1(id,answer){
				cmn.lbox.show();
				cmn.post({
					action:"Question_quesition",
					params:{
						id:parseInt(id),
						answer:answer
					}
				}).then(function(data){
					cmn.lbox.hide();
					if(data.answer&&data.answer.indexOf("@")!=-1)data.answer=data.answer.split("@");
					div.html(ejs.question,data,function(){
						div.find("#next1014").on("click",function(){
							f1(data.id,div.formToObject().answer);
						});
					});
				});
			}
			f1(ID);
			

		},
		renderDetail:function(){
			var _=this;
		}
	}
});